﻿using UnityEngine;
using System.Collections;

public class XuController : MonoBehaviour {
	public GameObject xu1;
	public GameObject xu2;
	public GameObject xu3;
	public GameObject xu4;
	public static string tenxu;
	private Animator animator;
	private Animator animator1;
	private Animator animator2;
	private Animator animator3;
	private Animator animator4;
	// Use this for initialization
	void Start () {
		animator = gameObject.GetComponent<Animator> ();
		animator1 = xu1.GetComponent<Animator> ();
		animator2 = xu2.GetComponent<Animator> ();
		animator3 = xu3.GetComponent<Animator> ();
		animator4 = xu4.GetComponent<Animator> ();

	}
	
	// Update is called once per frame
	void Update () {
	

			

	}
	void OnMouseDown()
	{
		tenxu = gameObject.tag;
		animator.SetBool("isChonXu",true);
		animator.SetBool("isBoChonXu",false);
		animator1.SetBool("isChonXu",false);
		animator1.SetBool("isBoChonXu",true);
		animator2.SetBool("isChonXu",false);
		animator2.SetBool("isBoChonXu",true);
		animator3.SetBool("isChonXu",false);
		animator3.SetBool("isBoChonXu",true);
		animator4.SetBool("isChonXu",false);
		animator4.SetBool("isBoChonXu",true);


	}

}
